package com.crm.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.crm.crm.domain.InsertRecord;
import com.crm.crm.domain.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface TransferMapper extends BaseMapper<InsertRecord> {
    @Select("select create_by from insert_record where user_id =#{finalEx}")
    String selcetByUserId(Long finalEx);
    @Select("select clue_count from insert_record where user_id = #{ex}")
    Integer getClueCount(Long ex);
    @Update("update insert_record set clue_count = #{clueCount} where user_id = #{finalEx}")
    void setClueCount(Long finalEx, Integer clueCount);
    @Update("update insert_record set clue_count = 0 where user_id = #{ex}")
    void cleanClueCount(Long ex);
    @Select("select business_count from insert_record where user_id = #{ex}")
    Integer getBusinessCount(Long ex);
    @Update("update insert_record set business_count = #{businessCount} where user_id = #{finalEx}")
    void setBusinessCount(Long finalEx, Integer businessCount);
    @Update("update insert_record set business_count = 0 where user_id = #{ex}")
    void cleanBusinessCount(Long ex);
}
